package User;

import Operation.*;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-04-13
 * Time: 12:51
 */
public class Admin extends User{
    public Admin(String name) {
        super(name);
        this.iOperation= new IOperation[]{
                new ExitSystem(),
                new FindOperation(),
                new AddOperation(),
                new DeleteOperation(),
                new DisplayOperation()
        };
    }
    @Override
    public int menu() {
        System.out.println("---------------------------");
        System.out.println("欢迎"+this.name+"进入图书管理系统");
        System.out.println("0.退出系统");
        System.out.println("1.查找图书");
        System.out.println("2.新增图书");
        System.out.println("3.删除图书");
        System.out.println("4.显示所有图书");
        System.out.println("---------------------------");
        Scanner scan = new Scanner(System.in);
        int choice = scan.nextInt();
        return choice;
    }
}
